home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PACKET / YAPP20.ZIP / YAPPXFER.DOC < prev    next >
Text File  |  1986-12-06  |  5KB  |  176 lines

  1. YAPP(tm) protocol for Packet Radio binary file transfer
  2.  
  3. (c) 1986, Jeff Jacobsen - WA7MBL
  4.  
  5. Revision 1.1   06/23/86
  6.  
  7. ----------------------------------------------------------
  8.  
  9. YAPP PACKET TYPES
  10.  
  11. Size of packet data ranges from 2-258 bytes.
  12. len = length of following bytes (not including len)
  13.  
  14.  
  15. RR Rcv_Rdy      ACK  01
  16.  
  17. RF Rcv_File     ACK  02
  18.  
  19. AF Ack_EOF      ACK  03   [1.1]
  20.  
  21. AT Ack_EOT      ACK  04   [1.1]
  22.  
  23.  
  24. SI Send_Init    ENQ  01
  25.  
  26. HD Send_Hdr     SOH  len  (Filename)  NUL  (File Size in ASCII)  NUL  (Opt)
  27.  
  28. DT Send_Data    STX  len  (Data)    {if len=0 then data length = 256}
  29.  
  30. EF Send_EOF     ETX  01
  31.  
  32. ET Send_EOT     EOT  01
  33.  
  34.  
  35. NR Not_Rdy      NAK  len  (Optional Reason in ASCII)
  36.  
  37. CN Cancel       CAN  len  (Optional Reason in ASCII)
  38.  
  39. CA Can_Ack      ACK  05
  40.  
  41.  
  42. {Following are for use in Server mode}
  43.  
  44.  
  45. RI Rcv_Init     ENQ   02   len   (Filespec requested - wildcard allowed)
  46.  
  47. TX Text         DLE   len  (ASCII text for display)  {to send text from server}
  48.  
  49.  
  50. {Unimplement - Reserved for Server Commands}
  51.  
  52. UU Comands      ENQ   03
  53.                 ENQ   04
  54.                 ENQ   05
  55.                 ...     
  56.                 ENQ   FF     
  57.  
  58.  
  59. STATE TABLES for SEND
  60.  
  61.  
  62. State         Send Pkt        Upon                  Next State
  63.  
  64. S (Send)      SI              RR                    SH
  65.                               RF                    SD
  66.                               NR                    Start/Done
  67.                               First few timeouts    S
  68.                               RI                    S
  69.                               Other/Timeout         Abort
  70.  
  71. SH (Hdr)      HD              RF                    SD
  72.                               NR                    Start/Done
  73.                               Other/Timeout         Abort
  74.  
  75. SD (Data)     DT              (Not EOF)             SD
  76.                               (EOF)                 SE
  77.  
  78. SE (EOF)      EF              AF (More files)       SH
  79.                               AF (No More Files)    ST
  80.                               Other/Timeout         Abort
  81.  
  82. ST (EOT)      ET              AT                    Start/Done
  83.                               Other/Timeout         Start/Done
  84.  
  85.  
  86.  
  87. STATE TABLES for RECEIVE
  88.  
  89.  
  90. State      On    If           Do          Send Pkt       Next State
  91.   
  92. R (Rec)    SI (ready)                       RR              RH
  93.            SI (opt)*       open file        RF              RD
  94.            SI (not ready)                   NR              Start/Done
  95.            NR                                               Start/Done
  96.            Other/Timeout                                    Abort
  97.  
  98. (opt)*  If header info not desired it is ok to
  99.         open file and indiate ready for file
  100.  
  101. RH (Hdr)   HD              open file        RF              RD
  102.            HD (no room)                     NR              Start/Done
  103.            SI                                               RH
  104.            ET                               AT              Start/Done
  105.            Other/Timeout                                    Abort
  106.  
  107. RD (Data)  DT              store data                       RD
  108.            EF              close file       AF              RH
  109.            Other/Timeout                                    Abort
  110.  
  111.  
  112.  
  113. OTHER STATE
  114.  
  115.  
  116. Any State          On CN         Send CA                   Start/Done
  117. except CW
  118.  
  119.  
  120. CW (Can_Wait)      On CA                                   Start/Done
  121.                    On CN         Send CA                   CW
  122.                    Timeout       Display Err Msg           Start/Done
  123.  
  124.  
  125. Abort                            Send CN                   CW
  126.  
  127.  
  128.  
  129. --------
  130. Starting States
  131.  
  132.  
  133. For 2 users not using Remote Server
  134.  
  135.     Sender goes to State S, Receiver to State R after manually
  136.     exchanging file names.  Since File Name is known, Recevier
  137.     may optionally send RF from state R and bypass file header.
  138.     Sender should give Receiver ample time to get into Receive
  139.     State.
  140.  
  141.  
  142.  
  143. For Remote Server Mode
  144.  
  145.   USER (Start)                                       Next State
  146.  
  147.   User wishing to Send                               S
  148.   User wishing to Receive          Send RI           R
  149.   Other Server Request             Send COMMAND      Start
  150.  
  151.   SERVER (Start)
  152.  
  153.   Gets SI                                            R
  154.   Gets RI             (file fnd)                     S
  155.                       (no file)    Send NR           Start
  156.  
  157.   Gets COMMAND                    (Do Command)       Start
  158.  
  159.  
  160. ---------------------------------------------------------
  161. All states except Send Data should timeout if nothing is heard
  162. for a period of time Tc (Crash timer).  Send Data isn't expecting
  163. any input and if it should receive some it must be a Cancel, or
  164. a TX (text) packet, otherwise Abort.
  165.  
  166.  
  167. --------
  168. Revision 1.1 - Added AF & AT to acknowledge End of File and
  169. End of Transfer.  This allows an automated sender to know that
  170. a file was received successfully.  It also helps get past a
  171. problem in the TNC-2 code by requiring the sender to wait for the
  172. Ack-EOT before switching from transparent mode back to converse
  173. mode.
  174.  
  175.  
  176.